package com.puman.houmu.puman.login;

import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

import com.puman.houmu.puman.R;

public class signUpActivity extends AppCompatActivity implements View.OnClickListener{
    private  static final String TAG = "signUpActivity";
    private EditText signMobile;  //注册手机号
    private EditText signIdent;   // 验证码框
    private EditText signPwd;    //登录密码
    private EditText signCPwd;   //确认密码
    private EditText signName;      //姓名
    private EditText signIdenNumber;  //身份证号
    private Button signGetCode;       //获取验证码
    private Button signReferBtn;       //注册

    private Button backButton;     //后退
    private TextView titleLabel;    //标题


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_sign_up);
        initView();
        initListence();
    }

    private void initView(){

       //隐藏系统自带导航栏
        ActionBar actionBar = getSupportActionBar();
        if (actionBar != null){
            actionBar.hide();
        }
        signMobile = (EditText) findViewById(R.id.signMobile);
        signPwd = (EditText) findViewById(R.id.signPwd);
        signCPwd = (EditText) findViewById(R.id.signCPwd);
        signIdent = (EditText) findViewById(R.id.signIdent);
        signGetCode = (Button) findViewById(R.id.getCodeBtn);
        signName = (EditText) findViewById(R.id.signName);
        signIdenNumber = (EditText) findViewById(R.id.signCard);
        signReferBtn = (Button) findViewById(R.id.referBtn);

        backButton = (Button) findViewById(R.id.topBar_back);
        //获取Drawable对象
//        Drawable drawable = getDrawable(R.drawable.back);
//        backButton.setCompoundDrawables(drawable,null,null,null);
        titleLabel = (TextView) findViewById(R.id.topBar_title);
        titleLabel.setText("注册扑满");

    }

    //设置监听器
    private void initListence(){
        signGetCode.setOnClickListener(this);
        signReferBtn.setOnClickListener(this);
        backButton.setOnClickListener(this);
    }
    //单机事件监听
    public void onClick(View v){
        if (v == signGetCode){
            getCode();
        } else if (v == signReferBtn){
            signUp();
        } else if(v  == backButton){
            finish();
        }
    }

    private void getCode(){

    }

    private void signUp(){

    }


}

